package org.biliviz.be.controller;

import io.swagger.annotations.ApiOperation;
import org.biliviz.be.entity.AuthorData;
import org.biliviz.be.service.AuthorDataService;
import org.biliviz.be.util.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author sg
 * @since 2024-03-02
 */
@RestController
@RequestMapping("/api")
public class AuthorDataController {
    @Autowired
    AuthorDataService authorDataService;
    @GetMapping("/author/data")
    public R loginUser() {
        List<AuthorData> aData= authorDataService.getAll();
        return R.ok().data("aData",aData);
    }
}
